Fix prefix sorting
authorJustin Burkett <justin@burkett.cc>
Mon, 21 Jun 2021 18:55:05 +0000 (14:55 -0400)
committerJustin Burkett <justin@burkett.cc>
Mon, 21 Jun 2021 18:55:05 +0000 (14:55 -0400)
which-key-tests.el
which-key.el

index 0461737799970ef6d946bdc607384f1b801c9332..705099b0603e7213030be5476029d72dd13d2d18 100644 (file)
                 ("A" . "Z")
                 ("b" . "y")
                 ("B" . "Y")
-                ("p" . "Prefix")
+                ("p" . "prefix")
                 ("SPC" . "x")
                 ("C-a" . "w"))))
     (let ((which-key-sort-uppercase-first t))
index ec3f760159bbd19cb86cc1e6ddb7f653dc19d931..55e65b884f31cf1c370b725e3f15fb81a4e062eb 100644 (file)
@@ -1401,7 +1401,8 @@ Uses `string-lessp' after applying lowercase."
   (string-lessp (downcase (cdr acons)) (downcase (cdr bcons))))
 
 (defsubst which-key--group-p (description)
-  (keymapp (intern description)))
+  (or (equal description "prefix")
+      (keymapp (intern description))))
 
 (defun which-key-prefix-then-key-order (acons bcons)
   "Order first by whether A and/or B is a prefix with no prefix